<?php
namespace Home\Controller;

use Think\Controller;

class ViewportController extends Controller
{
    public function index()
    {


            $id=$_SESSION['id'];
            $res=D('User')->getarr($id);
            $sex='';
            switch($res['sex']){
                case '男':
                    $sex='iconfont icon-nan';
                break;
                case '女':
                    $sex='iconfont icon-nv';
                break;
                default :
                    $sex="";
                break;
            }
            $this->assign('res',$res);
            $this->assign('sex',$sex);
            $this->display();


    }



}